<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

class Links {

	public function __construct(){
		$this->CI =& get_instance();
	}

	public function nav_link($link,$label){

		if($this->CI->uri->segment(1) == 'home')
			if($link == ''){
				$nav_link = '<li>'.anchor($link,$label,'class = active').'</li>';
				return $nav_link;
			}

		if($this->CI->uri->segment(1) == $link)
			$nav_link = '<li>'.anchor($link,$label,'class = active').'</li>';
		else $nav_link = '<li>'.anchor($link,$label).'</li>';

		return $nav_link;

	}

	public function dashboard_link($link,$label){

		if($this->CI->uri->segment(1) == $link)
			$nav_link = '<li class="active">'.anchor($link,$label).'</li>';
		else $nav_link = '<li>'.anchor($link,$label).'</li>';

		return $nav_link;

	}

}
